<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
	var base = "${base}/";
</script>
<!--框架必需-->
<script type="text/javascript" src="${base}/scripts/plugins/jquery-1.7.1.js"></script>
<script type="text/javascript" src="${base}/scripts/framework.js"></script>
<link href="${base}/css/import_basic.css" rel="stylesheet" type="text/css"/>
<link href="${base}/css/sky/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
$(function(){
	if (document.cookie.indexOf("showGoods=1") != -1) {
		top.Dialog.close();
		document.cookie="showGoods=0";
	}
})
</script>
</head>
<body>
<div class="position" id="top_list">
	<div class="center">
	<div class="left">
	<div class="right">
		<span>当前位置：商品管理 >> 商品列表<input type="hidden" id="orderNo" value="${(orderNo)!0}"/></span>
	</div>	
	</div>	
	</div>
</div>
<div id="hbox">
	<div class="bs_nav">
		<div class="bs_navleft">
		    <ul>
		    	<form action="${base}/admin/customer/findByKeyWord.action" method="post" target="customer_right">
		    	<li><span class="img_find"></span></li>
				<li>
					<select name="searchType">
						<option value="">按商品编号查询</option>
						<option value="1">按客户呢称查询</option>
						<option value="2">按真实姓名查询</option>
						<option value="3">按联系电话查询</option>
						<option value="4">按电子邮箱查询</option>
					</select>
				</li>
				<li><input type="text" style="width:150px;" name="keyWord"/></li>
				<li><input type="submit" class="button" value="查询"/></li>
				</form>
			</ul>
		</div>
		<div class="bs_navright">
			<a onclick="openWinAdd()"><span class="icon_add">新增商品</span></a>
			<div class="clear"></div>
		</div>
		<div class="clear"></div>
	</div>
</div>
<div id="scrollContent">
<table class="tableStyle">
	<tr>
		<th width="8%" class="th-title">编号</th>
		<th width="10%" class="th-title">名称</th>
		<th width="8%" class="th-title">样图</th>
		<th width="10%" class="th-title">规格</th>
		<th width="7%" class="th-title">成本价</th>
		<th width="7%" class="th-title">出售价</th>
		<th width="7%" class="th-title">批发价</th>
		<th width="7%" class="th-title">最近售价</th>
		<th width="7%" class="th-title">库存量</th>
		<th width="7%" class="th-title">状态</th>
		<th width="7%" class="th-title">供应商</th>
		<th width="15" class="th-title">基本操作</th>
	</tr>
	<#if (goodsList??) && (goodsList?size>0)>
		<#list goodsList as goods>
			<tr>
				<td>${(goods.goodsNo)!'' }</td>
				<td>${(goods.goodsName)!'' }</td>
				<td class="pic-center">
					<a href="javascript:;" ref="${base}/${(goods.pictureUrl)!''}" defaultTip="false" class="preview">
						<img src="${base}/${(goods.pictureUrl)!''}" alt="${(goods.goodsName)!'' }" class="imgBubble"/>
					</a>
				</td>
				<td>
					<span class="text_slice" style="width:80px;" title="${(goods.specification)!''}">${(goods.specification)!''}</span>
				</td>
				<td>${(goods.costPrice)!'0.00' }</td>
				<td>${(goods.unitPrice)!'0.00' }</td>
				<td>${(goods.wholesalePrice)!'0.00' }</td>
				<td>${(goods.recentPrice)!'0.00' }</td>
				<td>${(goods.stock)!'0.00' }</td>
				<td>
				<#if goods.saleStatus == 0>
					在售中
				<#else>
					已停货
				</#if>
				</td>
				<td>${(goods.merchant.merchantName)!''}</td>
				<td>
					<a onclick="openWinShow(${(goods.id)!0})"><span class="icon_view">查看</span></a>
					<a onclick="openWinFind(${(goods.id)!0})"><span class="icon_edit">修改</span></a>
					<a href="javascript:;" onclick="select(${(goods.id)!0})"><span class="icon_add">选择</span></a>
				</td>
			</tr>
		</#list>
	<#else>
		<tr>
			<td colspan="12">暂无商品记录</td>
		</tr>
	</#if>
</table>
<#include "/WEB-INF/tool/pager.ftl">
</div>
</body>
</html>
<script type="text/javascript" src="${base}/js/select-goods.js"></script>
<script type="text/javascript" src="${base}/scripts/plugins/img-prev.js"></script>
<script type="text/javascript" src="${base}/scripts/text/text-overflow.js"></script>
<script>
$(function() {
	//alert(self.location);
});
</script>